﻿<%@ Page Title="" Language="C#" MasterPageFile="~/NetSysQuiz.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="BladeTecWebApplication.Default" %>
<asp:Content ID="headContent" ContentPlaceHolderID="head" runat="server">

<script type="text/javascript">
	function validate() {
		if (Page_ClientValidate()) {
			$("#divRequired").hide();
		} else {
			$("#divRequired").show();
		}
	}
</script>

</asp:Content>
<asp:Content ID="defaultMainContent" ContentPlaceHolderID="MainContent" runat="server">

	<div>

		<asp:Panel cssclass="ui-widget" runat="server" Visible="false" ID="errorPanel">
			<div class="ui-state-error ui-corner-all" style="padding: 0 .7em;"> 
				<p><span class="ui-icon ui-icon-alert" style="float: left; margin-right: .3em;"></span> 
				<strong>Invalid email and key combination:</strong> Please contact the quiz administrator.</p>
			</div>
		</asp:Panel>
		<br />

		<div style="color: Red; display:none" id="divRequired">
		* Required<br /><br />
		</div>

		<table align="center">
			<tr>
				<td>Email:<asp:RequiredFieldValidator ID="rfEmail" runat="server" ControlToValidate="txtEmail" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator></td>
				<td style="width:10px;">&nbsp;</td>
				<td><asp:TextBox ID="txtEmail" runat="server" CssClass="stdTextBox" Width="250px" text=""></asp:TextBox></td>
			</tr>
			<tr>
				<td colspan="3" style="height:5px;">&nbsp;</td>
			</tr>
			<tr>
				<td>Quiz Key:<asp:RequiredFieldValidator ID="rfKey" runat="server" ControlToValidate="txtKey" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator></td>
				<td style="width:10px;">&nbsp;</td>
				<td><asp:TextBox ID="txtKey" runat="server" CssClass="stdTextBox" Width="250px" Text=""></asp:TextBox></td>
			</tr>
			<tr>
				<td colspan="3" style="height:5px;">&nbsp;</td>
			</tr>
			<tr>
				<td colspan="3" align="right"><asp:Button ID="btnTakeQuiz" runat="server" 
						Text="Take Quiz" onclick="btnTakeQuiz_Click" OnClientClick="validate();" /></td>
			</tr>
		</table>
	</div>

</asp:Content>
